import axios from '@/axios'
enum API {
    EVENT_GETALL = '/getEventAll',
    EVENT_GETPAGE = '/getEventPage',
    EVENT_GETKEYPAGE = '/SearchEventKey',
    EVENT_UPDATEBYID = '/updataEventById',
    EVENT_DELETEBYID = '/deleteEventById',
    EVENT_DELETEMOREBYID = '/deleteEventMoreById',
    EVENT_ADD = '/addEvent',
    EVENT_GETTYPE='/getType',
    EVENT_EVENTMAXTYPE='/getBigEventType',
    EVENT_EVENTKEYTYPE='/SearchEventTypeKey',
    EVENT_UPDATEBIGBYID='/updataEventTypeById',

    
    
}
// 获取所有事件信息
export const getEventAllAPI = () => axios.get(API.EVENT_GETALL)
// 分页查询事件
export const getEventPageAPI = (data: any) => axios.post(API.EVENT_GETPAGE, data)
// 指定key-value分页查询事件
export const getEventKeyPageAPI = (data: any) => axios.post(API.EVENT_GETKEYPAGE, data)
// 根据id更新事件
export const UpdateEventByIdAPI = (data: any) => axios.post(API.EVENT_UPDATEBYID, data)
// 根据id删除事件
export const DeleteEventByIdAPI = (id: string) => axios.delete(`${API.EVENT_DELETEBYID}/${id}`)
// 根据id批量事件
export const DeleteEventMoreByIdAPI = (ids: any) => axios.post(API.EVENT_DELETEMOREBYID, ids)
// 添加事件
export const AddEventAPI = (data: any) => axios.post(API.EVENT_ADD, data)
// 获取所有事件类型
export const getEventTypeAPI = () => axios.get(API.EVENT_GETTYPE)

// 分页查询事件大类
export const getMaxEventAPI = (data: any) => axios.post(API.EVENT_EVENTMAXTYPE, data)
// 指定key-value分页查询事件类型
export const SearchEventTypeKey = (data: any) => axios.post(API.EVENT_EVENTKEYTYPE, data)

// 根据id更新事件
export const updataEventTypeById = (data: any) => axios.post(API.EVENT_UPDATEBIGBYID, data)